import Vue from 'vue'
import VueRouter from 'vue-router'
import UIRouter from '@/views/UIRouter'
import About from '@/views/About'
import Contacts from '@/views/Contacts'
import AllContacts from '@/views/second/AllContacts'
import Alice from '@/views/second/Alice'
import Bob from '@/views/second/Bob'
import Blog from '@/views/second/third/Blog'
import Fax from '@/views/second/third/Fax'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/uirouter'
  },
  {
    path: '/uirouter',
    name: 'UIRouter',
    component: UIRouter
  },
  {
    path: '/about',
    name: 'About',
    component: About
  },
  {
    path: '/contacts',
    name: 'Contacts',
    component: Contacts,
    children: [
      {
        path: 'allcontacts',
        name: 'AllContacts',
        component: AllContacts,
      },
      {
        path: 'alice',
        name: 'Alice',
        component: Alice,
      },
      {
        path: 'bob',
        name: 'Bob',
        component: Bob,
        children: [
          {
            path: 'blog',
            name: 'Blog',
            component: Blog,
          },
          {
            path: 'fax',
            name: 'Fax',
            component: Fax,
          },
        ]
      },
    ]
  }
]
const router = new VueRouter({
  routes
})
export default router